<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
function validate_email($string) {
	return preg_match("/^[-a-z0-9!#$%&'*+\/=?^_`{|}~]+(?:\.[-a-z0-9!#$%&'*+\/=?^_`{|}~]+)*@(?:[a-z0-9]([-a-z0-9]{0,61}[a-z0-9])?\.)*(?:aero|arpa|asia|biz|cat|com|coop|edu|gov|info|int|jobs|mil|mobi|museum|name|net|org|pro|tel|travel|[a-z][a-z])$/i", $string);
}
function validate_phone($string) {
		$string = str_replace(" ", "", $string);
		$string = str_replace("(", "", $string);
		$string = str_replace(")", "", $string);
		return preg_match("/^\+([0-9]{11})$/", $string);
}
function valid_float($string) {
	if ($string != "")
		return preg_match("/^[0-9]{0,10}\.[0-9]{2}$/", $string);
	else return true;
}

?>